<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue 组件</title>
</head>
<body>
<div id="app">
    <mod :abc="name" :head_on="title"></mod>
    <div><input type="text" v-model="name"></div>
</div>
<script src="js/vue.min.js"></script>
<script>
    Vue.component('mod',{
        template:'<div class="bg_head">{{head_on}} {{abc}}</div>',
        props:['abc','head_on'],
        data:function () {
            return {
                headNav:[{item:"移动选号"},{item:"电信选号"},{item:"联通选号"},{item:"虚拟运营商选号"},{item:"座机选号"}],
            }
        },
        methods:{
            headBtn:function (i) {
                this.d=i
            }
        }
    });
    var app = new Vue({
        el:"#app",
        data:{
            name:true,
            title:15493
        },
        methods:{

        }
    })
</script>
</body>
</html>